package com.example.network_sdk.interceptor

import com.blankj.utilcode.util.SPUtils
import okhttp3.Interceptor
import okhttp3.Response

class TokenInterceptor : Interceptor {
    override fun intercept(chain: Interceptor.Chain): Response {
        val token = SPUtils.getInstance().getString("token")
        val request = chain.request()
        val builder = request.newBuilder()
        builder.addHeader("token",token)
        return chain.proceed(builder.build())
    }
}